<template>
  <div class="content-wrap">
    <el-descriptions title="" :column="3">
      <el-descriptions-item label="订单号">
        {{ orders.orderid }}
      </el-descriptions-item>
      <el-descriptions-item label="订单状态">{{
        orders.orderstatus
      }}</el-descriptions-item>

      <el-descriptions-item label="门店编码">{{
        orders.placepointid
      }}</el-descriptions-item>
      <el-descriptions-item label="门店名称">{{
        orders.placepointname
      }}</el-descriptions-item>
      <el-descriptions-item label="商家承担优惠金额"
        >￥{{ orders.discount || 0 }}</el-descriptions-item
      >
      <el-descriptions-item label="订单流水号">{{
        orders.orderindex
      }}</el-descriptions-item>
      <el-descriptions-item label="配送方式">{{
        orders.deliverystationno == -1 ? "自提" : "配送"
      }}</el-descriptions-item>
      <el-descriptions-item label="医疗机构">{{
        orders.medicalinstitution
      }}</el-descriptions-item>
      <el-descriptions-item label="处方编码">{{
        orders.prescriptionid
      }}</el-descriptions-item>
      <el-descriptions-item label="开方科室">{{
        orders.category
      }}</el-descriptions-item>
      <el-descriptions-item label="患者姓名">{{
        orders.usedrugname
      }}</el-descriptions-item>
      <el-descriptions-item label="性别">{{
        gend[orders.sex]
      }}</el-descriptions-item>
      <el-descriptions-item label="患者电话">{{
        orders.identitynumber
      }}</el-descriptions-item>
      <el-descriptions-item label="开单医生">{{
        orders.doctor
      }}</el-descriptions-item>
      <el-descriptions-item label="支付方式">{{
        PAY_TYPE[orders.orderpaytype]
      }}</el-descriptions-item>
      <el-descriptions-item label="支付时间">{{
        orders.payDate
      }}</el-descriptions-item>
      <el-descriptions-item label="开方日期">{{
        orders.prescriptiondate
      }}</el-descriptions-item>
      <el-descriptions-item label="创建时间">{{
        orders.redate
      }}</el-descriptions-item>
      <el-descriptions-item label="推送状态">{{
        orders.status
      }}</el-descriptions-item>
    </el-descriptions>
    <el-table
      :data="medicalRecordDiagnosisList"
      border
      style="width: 100%; margin-top: 30px"
    >
      <el-table-column label="订单号" align="center" prop="orderid" />
      <el-table-column label="医院的商品编码" align="center" prop="skuid" />
      <el-table-column label="erp的商品编码" align="center" prop="goodsid" />
      <el-table-column label="erp的商品名称" align="center" prop="goodsname" />
      <el-table-column label="单价" align="center" prop="price" />
      <el-table-column label="数量" align="center" prop="goodsqty" />
      <el-table-column label="金额" align="center" prop="money" />
    </el-table>
  </div>
</template>

<script> 
export default {
  props: ["id",'info'],
  dicts: ["yy_voucher_type", "yy_status_type"],
  data() {
    return {  
      PAY_TYPE: {
        1: "货到付款",
        4: "在线支付",
        6: "到店支付",
        "": "无",
      }, 
      gend: { 0: "未知", 1: "男", 2: "女", 9: "未说明" },
    };
  },
  computed: {
    medicalRecordDiagnosisList() {//处方明细 
      return this.info.ordersDetailsList || [];
    },
    orders() {// 处方信息
      return this.info.orders || {};
    },
  },
  methods: { 
  },
};
</script>
<style scoped lang="scss">
.content-wrap {
  padding: 32px 0 32px 0;
}
</style>
